<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        section{
            width: 500px;
            height: 500px;
            border: 1px solid #000;
            margin: 100px auto;
            position: relative;
        }
        div{
            /* 隐藏 */
            /* 第一种想法 - 透明  不可以 */
          /*   opacity:0  ;*/ /* 0-1 */
          transform: scale(0) /* 取负数？？？？ */
        }
        section div:nth-child(1){
            width: 80%;
            height: 1px;
            background: red;
            position: absolute;
            left: 10%;
            top: 80px;
            transition:0.5s;
            transform-origin: left top;
        }
        section div:nth-child(2){
            width: 80%;
            height: 1px;
            background: green;
            position: absolute;
            left: 10%;
            bottom: 80px;
            transition:0.7s;
            transform-origin: right bottom;
        }
        section div:nth-child(3){
            width: 1px;
            height: 80%;
            background: yellowgreen;
            position: absolute;
            left: 80px;
            top: 10%;
            transition:1s;
            transform-origin: left bottom;
        }
        section div:nth-child(4){
            width: 1px;
            height: 80%;
            background: blue;
            position: absolute;
            right: 80px;
            top: 10%;
            transition:1.2s;
            transform-origin: right top;
        }
        section:hover div{
            /* 出现的 */
            transform: scale(1)
        }
    </style>
</head>
<body>
    <section>
        <!-- 水平 -->
        <div></div>
        <div></div>
        <!-- 垂直 -->
        <div></div>
        <div></div>
    </section>
</body>
</html>
<!-- 
    transform-origin:x y  center center
        - x left right center
        - y top center bottom
 -->